package net.ak.dao;

import java.util.List;

import net.ak.model.User;
import net.ak.model.UserCategory;

public interface UserDao {
	
	/**
	 * This method is used to sign-in
	 * @param username
	 * @param password
	 * @return
	 */
	boolean login(String username, String password);
	
	/**
	 * This method is used to list all users
	 * @return
	 */
	List<User> listUsers();
	
	/**
	 * This method is used to list users by category
	 * @param categories
	 * @return
	 */
	List<User> listUsersByCategory(List<UserCategory> categories);
	
	/**
	 * This method is used to get user by email.
	 * @param email
	 * @return
	 */
	User getUserByEmail(String email);
	
	/**
	 * This method is used to save or update {@link UserDao}.
	 * @param user
	 * @return
	 */
	boolean saveOrUpdate(User user);
	
	
	/**
	 * This method is used to get {@link User} by email and password.
	 * @param email
	 * @param password
	 * @return
	 */
	User getUserByEmailAndPassword(String email, String password);
	
}
